package com.gw.business.statistics.exception.task;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.gw.business.analysis.service.ExceptionTrackService;


@Component
public class UserExceptionInfoTask {

    /** 日志对象 */
    private static final Logger LOGGER = LoggerFactory.getLogger(UserExceptionInfoTask.class);
    @Resource
    public ExceptionTrackService exceptionTrackService;
   //每个10分钟执行一次
    @Scheduled(cron = "0 10 0 * * ?")
    //@Scheduled(cron = "0/10 * * * * ?")
    public void execute() throws Exception {
        LOGGER.info("UserExceptionInfoTask start");
        
        try {
            exceptionTrackService.dealExceptionInfo();
        } catch (Exception e) {
            LOGGER.error("异常信息查询出错，错误信息："+e.getMessage());
        }
        LOGGER.info("UserExceptionInfoTask end");
    }
    
	
}
